在类 Unix 操作系统中,“僵尸进程”指已经结束运行(exit)但其退出状态尚未被父进程通过 wait()/waitpid() 回收的子进程。它通常不再占用 CPU/内存执行任务,但仍在进程表中保留一条记录(例如 PID 和退出码),直到被“回收(reap)”。
/ˈzɑːmbi ˈprɑːsɛs/
/ˈzɒmbi ˈprəʊsɛs/
A zombie process appears when the parent doesn’t call wait().
当父进程不调用 wait() 时,就会出现僵尸进程。
If the server forks many children and fails to reap them, the system can accumulate zombie processes and exhaust the process table.
如果服务器频繁 fork 子进程却没有及时回收,它会累积大量僵尸进程,甚至耗尽进程表资源。
“Zombie”原指民俗与流行文化中的“僵尸”,在计算机语境里借用其意象,强调这类进程“已死却仍留在系统中”;“process”是操作系统的基本概念“进程”。该术语常见于 Unix/Linux 进程管理与系统编程讨论。